<%@ page pageEncoding="UTF-8"%>

<%@ taglib uri="/tags/struts-tiles" prefix="tiles"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<%@ taglib uri="/tags/struts-nested" prefix="nested"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/tags/trymore" prefix="tm"%>

<style>
	.tbl td {border-color: #797979}
	#pcardtbl td.banner {line-height: 30px; font-size: 18px; font-weight: bold; text-align: center; margin: 0;}
	#pcardtbl td.field {background-color: #CFDBEC; line-height: 25px; text-align: center; margin: 0; width: 100px; font-size: 9pt;}
	#pcardtbl input.textInput {float:none;margin: 5px; width: 80px; height: 23px;}
</style>

<script type="text/javascript">
	$(function(){
	});
	
</script>

<div class="pageContent">
	<form method="post" action="app/card/personal.do?action=actionSavePersonalCard" 
		class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);" id="formGroup">
		<div class="pageFormContent" layoutH="56">
			<table class="tbl" cellpadding="0" cellspacing="0" width="98%" border="1" style="border-collapse: collapse; border-color: #797979; margin: 0 auto;" rules="all" id="pcardtbl">
				<tr>
					<td class='field'>姓名：</td>
					<td><input name="fullName" type="text" value="${entity ne null ? entity.fullName : ''}" class="required" style="width: 92%" ${op ne null && op eq 'view' ? 'readonly' : ''}/></td>
					<td class='field'>单位：</td>
					<td><input name="company" type="text" value="${entity ne null ? entity.company : ''}" style="width: 92%" ${op ne null && op eq 'view' ? 'readonly' : ''}/></td>
				</tr>
				<tr>
					<td class='field'>职务：</td>
					<td><input name="jobTitle" type="text" value="${entity ne null ? entity.jobTitle : ''}" style="width: 92%" ${op ne null && op eq 'view' ? 'readonly' : ''}/></td>
					<td class='field'>办公电话：</td>
					<td><input name="officePhone" type="text" value="${entity ne null ? entity.officePhone : ''}" style="width: 92%" ${op ne null && op eq 'view' ? 'readonly' : ''}/></td>
				</tr>
				<tr>
					<td class='field'>手机：</td>
					<td><input name="mobilePhone" type="text" value="${entity ne null ? entity.mobilePhone : ''}" style="width: 92%" ${op ne null && op eq 'view' ? 'readonly' : ''}/></td>
					<td class='field'>邮箱：</td>
					<td><input name="email" class="email" type="text" value="${entity ne null ? entity.email : ''}" style="width: 92%" ${op ne null && op eq 'view' ? 'readonly' : ''}/></td>
				</tr>
				<tr>
					<td class='field'>地址：</td>
					<td colspan="3"><input name="address" type="text" value="${entity ne null ? entity.address : ''}" style="width: 97%" ${op ne null && op eq 'view' ? 'readonly' : ''}/></td>
				</tr>
				<tr>
					<td class='field'>QQ：</td>
					<td><input name="qq" type="text" value="${entity ne null ? entity.qq : ''}" style="width: 92%" ${op ne null && op eq 'view' ? 'readonly' : ''}/></td>
					<td class='field'>所属行业：</td>
					<td style="padding-left: 5px;">
						<select name="industryId" class="combox">
							<logic:present name="industry">
								<logic:iterate name="industry" id="dict">
									<option value="${dict.id}" ${entity ne null && entity.industry ne null && entity.industry.id eq dict.id ? 'selected' : ''}>${dict.dictKey}</option>
								</logic:iterate>
							</logic:present>
						</select>
					</td>
				</tr>
				<tr>
					<td class='field'>所属项目编号：</td>
					<td colspan="3">
						<c:choose>
							<c:when test="${op eq null || (op ne null && op ne 'view')}">
								<input type="text" id="projectNo" name="pobj.projectNo" value="" style="width: 97%;" 
									postField="search" suggestFields="projectName,projectNo" suggestUrl="app/project/base.do?action=lookupProjectByNo" lookupGroup="pobj"/>
							</c:when>
							<c:otherwise>
								<input name="projectNo" type="text" value="${entity ne null ? entity.projectNo : ''}" style="width: 97%" ${op ne null && op eq 'view' ? 'readonly' : ''}/>
							</c:otherwise>
						</c:choose>
					</td>
				</tr>
			</table>
			
			<div align="right" style="margin-top: 15px; margin-right: 5px;">
				<table cellpadding="0" cellspacing="0" style="border-top: 1px solid #999; padding-top: 10px;">
					<tr>
						<td width="95px" align="center">登记人</td>
						<td>
							<input name="rec.id" type="hidden" value="${entity ne null && entity.recorder ne null ? entity.recorder.id : (recorder ne null ? recorder.id : '')}" />
							<input class="required" error_message="请输入`登记人`" name="rec.username" type="text" value="${entity ne null && entity.recorder ne null ? entity.recorder.username : (recorder ne null ? recorder.username : '')}" <c:if test="${op eq null || op ne 'view'}">postField="search" suggestFields="username,userNo" suggestUrl="app/base.do?action=lookupUserByName" lookupGroup="rec"</c:if> style="width: 90%;" ${op ne null && op eq 'view' ? 'readonly' : ''}/>
						</td>
					</tr>
				</table>
			</div>
		</div>
		
		<div class="formBar">
			<ul>
				<c:choose>
					<c:when test="${op ne null && op eq 'view'}">
						<li>
							<div class="button"><div class="buttonContent"><button type="button" class="close">关闭</button></div></div>
						</li>
					</c:when>
					<c:otherwise>
						<li>
							<div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div>
						</li>
						<li>
							<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
						</li>
					</c:otherwise>
				</c:choose>
			</ul>
		</div>
		<input type="hidden" name="id" value="${entity ne null ? entity.id : '-1'}" />
	</form>
</div>